import request from '@/config/axios'
/**
 * 分页查询菜品
 */
export const query = (params) => {
  return request.get({ url: '/restaurant/dish/query', params })
}

/**
 * 创建菜品
 */
export const create = (data) => {
  return request.post({ url: '/restaurant/dish/create', data })
}

/**
 * 删除菜品
 */
export const deleted = (id) => {
  return request.delete({ url: '/restaurant/dish/deleted?id=' + id })
}

/**
 * 更新菜品
 */
export const update = (data) => {
  return request.put({ url: '/restaurant/dish/update', data })
}

/**
 * 分页查询菜品类型
 */
export const pageQueryDishType = (params) => {
  return request.get({ url: '/restaurant/dish/page-query-dish-type', params })
}

/**
 * 创建菜品类型
 */
export const dishTypeCreate = (data) => {
  return request.post({ url: '/restaurant/dish/dish-type-create', data })
}

/**
 * 更新菜品类型
 */
export const dishTypeUpdate = (data) => {
  return request.put({ url: '/restaurant/dish/dish-type-update', data })
}

/**
 * 删除菜品类型
 */
export const dishTypeDelete = (id) => {
  return request.delete({ url: '/restaurant/dish/dish-type-delete?id=' + id })
}

/**
 * 获取单个菜品类型
 */
export const dishTypeGet = (id) => {
  return request.get({ url: '/restaurant/dish/dish-type-get?id=' + id })
}

/**
 * 获取单个菜品类型
 */
export const singleGetDishType = (id) => {
  return request.get({ url: '/restaurant/dish/single-get-dish-type?id=' + id })
}

/**
 * 查询菜品类型
 */
export const listQueryDishType = () => {
  return request.get({ url: '/restaurant/dish/list-query-dish-type' })
}

/**
 * 获取单个菜品
 */
export const singleGet = (id) => {
  return request.get({ url: '/restaurant/dish/single-get?id=' + id })
}

/**
 * 获取多个菜品
 */
export const multipleGet = (ids) => {
  return request.get({ url: '/restaurant/dish/multiple-get?ids=' + ids })
}
